package com.zm.demo.core.exception;

import static java.lang.System.out;

/**
 * Created by Administrator on 2019/7/14.
 */
public class TryfinallyT {

    public Integer sum(Integer a, Integer b){
        try {
            Integer c = a + b;
            return c;
        }catch (Exception e){
            e.printStackTrace();
        }finally {
            a = a+1;
            return a;
        }
    }

    public static void main(String[]args){
        String str = "12121";
        String str2= "12121";
        out.println("str == str2 : " +  str == str.intern());
        out.println("str == str2 : " +  str == str2);
        out.println("str.equals( str2) : " + str.equals( str2));
        String str1 = str + "extend";
        TryfinallyT t = new TryfinallyT();
            Integer result = t.sum(2, null);
        out.println(result);
    }
}
